IF LASTKEY()=27
   CLOS ALL
   RETURN
ENDIF
recn1=RECN1+1
DO SAYG WITH 12,70,RECN1,'9,999.99','999,999'
*@ 12,70 say recn1 pict "999,999"
TPR=TPR+TOT_PRICE
PTL=PTL+PROC_PAY
PPR=PPR+PROC_PAY
NTL=NTL+1
NPR=NPR+1
do case
   case area_code='G'
      TGP=TGP+TOT_PRICE
      PGP=PGP+PROC_PAY
      NGP=NGP+1
   case area_code='D'
      TDE=TDE+TOT_PRICE
      PDE=PDE+PROC_PAY
      NDE=NDE+1
   case area_code='X' .AND. SUB_AREACO<>'9'
      TXR=TXR+TOT_PRICE
      PXR=PXR+PROC_PAY
      NXR=NXR+1
   case area_code='X' .AND. SUB_AREACO='9'
      TUS=TUS+TOT_PRICE
      PUS=PUS+PROC_PAY
      NUS=NUS+1
   case area_code='L'
      TLA=TLA+TOT_PRICE
      PLA=PLA+PROC_PAY
      NLA=NLA+1
   case area_code='S' .OR. AREA_CODE='O'
      TSP=TSP+TOT_PRICE
      PSP=PSP+PROC_PAY
      NSP=NSP+1
   case area_code='P'
      TCU=TCU+TOT_PRICE
      PCU=PCU+PROC_PAY
      NCU=NCU+1
   case area_code='C' .OR. AREA_CODE='N'
      TCL=TCL+TOT_PRICE
      PCL=PCL+PROC_PAY
      NCL=NCL+1
   case area_code='Y'
      TSU=TSU+TOT_PRICE
      PSU=PSU+PROC_PAY
      NSU=NSU+1
   case area_code='E'
      TER=TER+TOT_PRICE
      PER=PER+PROC_PAY
      NER=NER+1
   CASE AREA_CODE='H'
      THF=THF+TOT_PRICE
      PHF=PHF+PROC_PAY
      NHF=NHF+1
ENDCASE
skip
